import { hRequest } from './index'

export const getOrderListApi = (params: any) =>
hRequest.get({
    url: "/list",
    params,
  });

export const getBasePriceListApi = (params: any) =>
hRequest.get({
    url: "/price/list",
    params,
});

/** 同步 */
export const getSynchronousApi = () =>
hRequest.get({
    url: "/price/synchronous"
});

/** 更新价格重量 */
export const updatePriceWeightApi = (data: any) =>
hRequest.post({
    url: "/price/update",
    data,
})

/** 采购订单采购 */
export const updateProcureApi = (data: any) =>
hRequest.post({
    url: "/procure/update",
    data,
})

/** 采购订单列表 */
export const getProcureOrderListApi = (params: any) =>
hRequest.get({
    url: "/procure/list",
    params,
  });

/** 查找补货列表 */
export const getReplenishmentOrderListApi = (params: any) =>
hRequest.get({
    url: "/repair/list",
    params,
  });

/** 添加补货信息 */
export const addReplenishmentOrderApi = (data: any) =>
hRequest.post({
    url: "/repair/add",
    data,
})

/** 检查库存 */
export const checkStockApi = (params: any) =>
hRequest.get({
    url: "/price/checkStock",
    params,
})

/** 修改库存 */
export const updateStockApi = (data: any) =>
hRequest.post({
    url: "/price/updateStock",
    data,
})

/** 导入物流信息 */
export const wuLiuOrderApi = (data: any) =>
hRequest.post({
    url: "/kuidi/order/upload",
    headers: {
        'Content-Type':'multipart/form-data'
    },
    data,
})

/** 导出模板 */
export const exportTemplateApi = (data: any) =>
hRequest.post({
    url: "/kuidi/order/export/template",
    responseType: 'blob',
    data,
})

/** 导出订单 */
export const exportOrderApi = (data: any) =>
hRequest.post({
    url: "/kuidi/order/export",
    responseType: 'blob',
    data,
})